Windows: Update how gtk-win32.rc is generated
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 22 Feb 2016 09:38:15 +0000 (17:38 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 22 Feb 2016 09:40:17 +0000 (17:40 +0800)
commit5962daef4ff2cd81bddba20ad0b49d8de16de287
treee6a3a4a27b7dfcdfe9e105f6b92bc38dbea26cc5
parent6c0270bbcb3864800334999b335f4c73d9941fc7
Windows: Update how gtk-win32.rc is generated

On Visual Studio, unlike MinGW, manifest files are embedded via
including the manifest file as a resource file in the projects, not
via the .rc file.  This means that the line in the .rc file that
specifies the manifest file would cause trouble, so that line gets
removed when the full gtk3-win32.rc is generated on Visual Studio builds,
otherwise 2010+ Visual Studio will complain when compiling the .rc file.
Also, the inclusion of winuser.h will cause warnings during the
compilation of the .rc file.

Fix this by isolating the Win32 resource portions of gtk-win32.rc.in to
gtk-win32.rc.body.in and:
-On MinGW, construct the full gtk-win32.rc by doing the winver.h and
 winuser.h inclusion first, then append the contents of gtk-win32.rc.body,
 and then appending the line to embed the manifest file.
-On Visual Studio, simply copy the gtk-win32.rc.body to gtk-win32.rc,
 and generate the full libgtk3.manifest file.

https://bugzilla.gnome.org/show_bug.cgi?id=762311
12 files changed:
build/win32/Makefile.am
build/win32/process-in-win32.py [deleted file]
build/win32/replace.py [new file with mode: 0644]
build/win32/vs10/gtk-3.vcxproj.filtersin
build/win32/vs10/gtk-3.vcxprojin
build/win32/vs10/gtk3-gen-srcs.props
build/win32/vs10/gtk3-gen-srcs.vsprops [new file with mode: 0644]
build/win32/vs9/gtk-3.vcprojin
configure.ac
gtk/Makefile.am
gtk/gtk-win32.rc.body.in [new file with mode: 0644]
gtk/gtk-win32.rc.in [deleted file]